package algorithm.Stringhandle;

public class Example {
    char data[] = {'g', 'o', 'o','d'};
    String str = new String(data);
    char[] ch = {'a','b','c'};


    public static void main(String[] args) {
        Example ex = new Example();
        ex.change(ex.data,ex.ch);
        System.out.print(ex.str +" and " );
        System.out.print(ex.ch);
    }

    public void change (char[] str,char ch[]){
        str[0] = 'b';
        ch[0] = 'g';

    }
}
